{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "from openpyxl import load_workbook "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "dir = \"Transaction_20241110030000\"\n",
    "xls_name = \"1108_lost.xlsx\"\n",
    "dir_108 = \"108_files\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[<Worksheet \"Sheet1\">]\n",
      "(<Cell 'Sheet1'.A1>, <Cell 'Sheet1'.B1>, <Cell 'Sheet1'.C1>, <Cell 'Sheet1'.D1>, <Cell 'Sheet1'.E1>)\n",
      "['TRADE_TYPE', 'TRADE_TIME', 'TRADE_AMT', 'TERMINAL_FLAG', 'LOGIC_NO']\n",
      "['63', '20241108195823', '01c2', '04230602', '3300000105003105']\n",
      "['63', '20241108212258', '0168', '04230602', '3300000104ffd96a']\n",
      "['63', '20241108211505', '01c2', '04230603', '33000002002c8c35']\n",
      "['63', '20241108211545', '010e', '04230603', '33000002002b9f28']\n",
      "['63', '20241108211552', '0168', '04230603', '3300000104fec144']\n",
      "['63', '20241108211623', '01c2', '04230603', '3300000104feb403']\n",
      "['63', '20241108211627', '0168', '04230603', '3300000104f28c3b']\n",
      "['63', '20241108212910', '0168', '04230603', '3331303437333030303030333032363433383720']\n",
      "['63', '20241108212919', '0168', '04230603', '3331303437333030303037333030393633363320']\n",
      "['63', '20241108205023', '00b4', '04230605', '330000020027da15']\n",
      "['63', '20241108212859', '0168', '04230615', '3300000601d7375f']\n",
      "['63', '20241108214435', '0168', '04240601', '3300000602847f56']\n",
      "['63', '20241108214444', '0168', '04240601', '33000016043b96d7']\n",
      "['63', '20241108223043', '0190', '04240601', '3331303531373030373031373534323738303320']\n",
      "['63', '20241108221026', '00c8', '04240602', '3331303437373030353535323835373430343120']\n",
      "['63', '20241108210544', '00b4', '04240603', '33000016058e9d8d']\n",
      "['63', '20241108224847', '0168', '04240603', '33000001000bbc7e']\n",
      "['63', '20241108213912', '010e', '04240604', '33000016058c73e1']\n",
      "['63', '20241108213915', '010e', '04240604', '33000002002b662b']\n",
      "['63', '20241108223811', '00c8', '04240604', '3331303531373030373031313034323134393720']\n",
      "['63', '20241108231839', '0168', '04240604', '3331303437333030303037333030353037393620']\n",
      "['03', '20241108233917', '00c8', '04240605', '00000112f5010c2c']\n",
      "['63', '20241108214527', '0000', '04240606', '33000901003daccd']\n",
      "['63', '20241108215824', '0168', '04240606', '3300001601408f94']\n",
      "['63', '20241108231902', '0168', '04240606', '3331303437333030303030333031313737333420']\n",
      "['63', '20241108211942', '00f0', '04240607', '3300001204d92084']\n",
      "['63', '20241108215858', '0168', '04240608', '3331303437333030303030333130353534383520']\n",
      "['63', '20241108223820', '0168', '04240608', '3300001605945ac1']\n",
      "['63', '20241108224834', '00c8', '04240608', '3331303438373033323031303436363835363120']\n",
      "['63', '20241108232040', '0168', '04270609', '33000001050977f0']\n",
      "['63', '20241108204116', '0168', '04270610', '3300000105093b76']\n",
      "['63', '20241108225325', '0000', '04270610', '33000901003373f8']\n",
      "['63', '20241108205554', '01c2', '04280602', '3300000105094521']\n",
      "['63', '20241108222144', '0190', '04280602', '3331303439313032303030313137363734373020']\n",
      "['63', '20241108210728', '01c2', '04280604', '3300000100a99f9e']\n",
      "['63', '20241108222152', '0000', '04280604', '330009010030f999']\n",
      "['03', '20241108224215', '0190', '04280604', '0000011297a110af']\n",
      "['63', '20241108205611', '0168', '04280621', '3300001605ce56b5']\n",
      "['63', '20241108183530', '010e', '04290601', '330000020015ffc5']\n",
      "['63', '20241108183937', '00b4', '04290601', '33000016059854cc']\n",
      "['63', '20241108194101', '010e', '04290601', '3331303437333030303037333030313731383520']\n",
      "['63', '20241108200018', '010e', '04290601', '3331303437333030303030333131363031383620']\n",
      "['03', '20241108201156', '012c', '04290601', '0000011303840aa1']\n",
      "['03', '20241108201151', '012c', '04290602', '00000112aad1116d']\n",
      "['63', '20241108221609', '010e', '04290602', '33000002001ab97d']\n",
      "['63', '20241108214257', '00b4', '04290603', '3300001204d8b808']\n",
      "['63', '20241108214423', '0000', '04290603', '33000901001e2b82']\n",
      "['63', '20241108212515', '00b4', '04310601', '33000012003dbd92']\n",
      "['63', '20241108212531', '00f0', '04310601', '33000012003e3ccf']\n",
      "['63', '20241108215051', '00f0', '04310601', '3300001200298708']\n",
      "['63', '20241108215108', '0168', '04310601', '3300000104f395dd']\n",
      "['63', '20241108212412', '00b4', '04310602', '33000012003096d5']\n",
      "['63', '20241108212431', '00b4', '04310602', '330000120598afc4']\n",
      "['63', '20241108195251', '0168', '04310604', '3300001605cf07bb']\n",
      "['63', '20241108212432', '00b4', '04310604', '33000012003e184d']\n",
      "['63', '20241108215118', '012c', '04310605', '3331303531373030373031373734323833323020']\n",
      "['63', '20241108215122', '00b4', '04310605', '330000120598a8d9']\n",
      "['63', '20241108215142', '00b4', '04310605', '330000120140c3ac']\n",
      "['63', '20241108215145', '00b4', '04310605', '330000120140c3af']\n",
      "['63', '20241108212533', '0168', '04310607', '330000160590a52a']\n",
      "['63', '20241108212546', '0000', '04310607', '33000901001fe715']\n",
      "['63', '20241108212615', '010e', '04310607', '3300001605cf236b']\n",
      "['63', '20241108221701', '0000', '04320606', '33000901003d61ad']\n",
      "['63', '20241108210154', '010e', '04330601', '3300001605cde6a9']\n",
      "['63', '20241108215441', '00b4', '04330601', '3300000200276e9e']\n",
      "['63', '20241108211435', '00f0', '04330602', '3300001204d8c643']\n",
      "['63', '20241108215356', '00b4', '04330602', '33000012003e2fd7']\n",
      "['63', '20241108215405', '0168', '04330602', '33000016043bc6f0']\n",
      "['63', '20241108220103', '010e', '04330602', '3331303437333030303037333030333739373120']\n",
      "['63', '20241108205456', '00b4', '04330603', '3300001605cef91c']\n",
      "['63', '20241108214107', '0190', '04330604', '3331303531373030373031373734303338393720']\n",
      "['63', '20241108220655', '0168', '04330615', '33000001050898fe']\n",
      "['03', '20241108213233', '012c', '04330616', '00000112f5112459']\n",
      "['63', '20241108213516', '010e', '04330616', '33000002000a3b0a']\n",
      "['03', '20241108212836', '012c', '04330618', '00000112f8f11ee0']\n",
      "['63', '20241108223554', '0078', '04330618', '33000012002e96ee']\n",
      "['63', '20241108215804', '0000', '04340602', '330009010033021a']\n",
      "['63', '20241108210352', '00b4', '04340603', '330000020000901a']\n",
      "['63', '20241108210441', '0000', '04340603', '33000901003dcf38']\n",
      "['63', '20241108210016', '010e', '04340604', '33000001000b0972']\n",
      "['63', '20241108210650', '00b4', '04340604', '33000012003e7266']\n",
      "['63', '20241108210700', '00b4', '04340604', '33000002003ddb57']\n",
      "['03', '20241108213230', '00c8', '04340604', '00000112f8f212c3']\n",
      "['63', '20241108213317', '00b4', '04340604', '330000010508bbf2']\n",
      "['63', '20241108213301', '00b4', '04340608', '33000016058f2614']\n",
      "['63', '20241108184749', '0000', '04340609', '3300090100161244']\n",
      "['63', '20241108183012', '0000', '04340610', '330009010025d527']\n",
      "['63', '20241108183026', '0168', '04340610', '33000002001d8aba']\n",
      "['63', '20241108223604', '00b4', '04340612', '330000120022e9b8']\n",
      "['63', '20241108223641', '00b4', '04340612', '330000120140a308']\n",
      "['63', '20241108194844', '00b4', '04350601', '3331303437333030303037333030353131313120']\n",
      "['63', '20241108194854', '0000', '04350602', '33000901002e4b6a']\n",
      "['63', '20241108195005', '0168', '04350602', '330000020006d9ed']\n",
      "['63', '20241108205748', '00b4', '04350602', '33000002001645f1']\n",
      "['63', '20241108200426', '00b4', '04350603', '3300000200313cb1']\n",
      "['63', '20241108201302', '00b4', '04350618', '3300001605ca5606']\n",
      "['63', '20241108201404', '00b4', '04350618', '3300001605cf69b0']\n",
      "['63', '20241108204027', '0168', '04350618', '3300001605bb3932']\n",
      "['63', '20241108204046', '0000', '04350618', '33000901001f5163']\n",
      "['63', '20241108204114', '0000', '04350618', '330009010004fad4']\n",
      "['63', '20241108204456', '0000', '04350618', '330009010028578c']\n",
      "['63', '20241108204503', '0000', '04350618', '330009010024a5a1']\n",
      "['63', '20241108210016', '0168', '04370603', '3300000602777c2f']\n",
      "['63', '20241108210027', '00b4', '04370603', '3300000104d6931e']\n",
      "['63', '20241108210030', '0168', '04370603', '330000010507f2a2']\n",
      "['63', '20241108210412', '0000', '04370603', '3300090100204fd0']\n",
      "['63', '20241108211145', '0000', '04370604', '330009010030ba03']\n",
      "['63', '20241108211155', '01c2', '04370604', '3300001605ba05ae']\n",
      "['63', '20241108221632', '00b4', '04370604', '33000016058e64b6']\n",
      "['63', '20241108194838', '010e', '04380601', '330000010507fc5b']\n",
      "['63', '20241108194923', '010e', '04380601', '3300001605caec28']\n",
      "['63', '20241108194959', '0000', '04380601', '33000901003e2cbc']\n",
      "['03', '20241108193716', '01f4', '04380602', '00000112afa2092e']\n",
      "['63', '20241108210012', '0000', '04380602', '33000901001f339b']\n",
      "['63', '20241108193516', '00b4', '04380604', '330000020001a64c']\n",
      "['63', '20241108193821', '00b4', '04380604', '3300000104d60dfb']\n",
      "['63', '20241108193907', '0000', '04380604', '330009010031ddf1']\n",
      "['63', '20241108200726', '0000', '04380604', '33000901003185a4']\n",
      "['63', '20241108200844', '0000', '04380604', '33000901003dc3c5']\n",
      "['03', '20241108192504', '0190', '04380610', '00000112ece10257']\n",
      "['63', '20241108194933', '00c8', '04380613', '3331303530363038303532303138333535313220']\n",
      "['63', '20241108185701', '0000', '04380619', '33000901003d0baa']\n",
      "['63', '20241108193949', '010e', '04380619', '3300001605976040']\n",
      "['63', '20241108204105', '0000', '04380714', '330009010020fda4']\n",
      "['63', '20241108190659', '00b4', '04380721', '3331303437333030303037333030343636373720']\n",
      "['03', '20241108210454', '012c', '04390604', '00000112b3011b34']\n",
      "['03', '20241108181820', '012c', '04390610', '00000112429221b2']\n",
      "['63', '20241108210833', '010e', '04390613', '3300001605cad8bc']\n",
      "['63', '20241108184027', '010e', '04400601', '3300000601d95e29']\n",
      "['63', '20241108184148', '0000', '04400601', '33000901003df18a']\n",
      "['63', '20241108190038', '0000', '04400601', '33000901002d088c']\n",
      "['63', '20241108192735', '0000', '04400602', '330009010020a797']\n",
      "['63', '20241108182258', '00b4', '04400604', '3300001205cf8dc4']\n",
      "['63', '20241108182320', '00b4', '04400604', '3300001605922d22']\n",
      "['63', '20241108184047', '010e', '04400604', '3331303437333030303037333030303437323320']\n",
      "['63', '20241108184052', '0168', '04400604', '3331303437333030303037333030373630333920']\n",
      "['63', '20241108180522', '0000', '04400618', '33000901003d5b7c']\n",
      "['63', '20241108180530', '0000', '04400618', '33000901000ffdb7']\n",
      "['63', '20241108180537', '0000', '04400618', '330009010033ae28']\n",
      "['63', '20241108180541', '0000', '04400618', '33000901002f77cc']\n",
      "['63', '20241108180601', '0000', '04400618', '33000901002b9b85']\n",
      "['63', '20241108194512', '0000', '04400618', '3300090100314aed']\n",
      "['63', '20241108195843', '00b4', '04400618', '330000010509ae26']\n",
      "['63', '20241108200557', '0168', '04400619', '3300000104f37c32']\n",
      "['63', '20241108193311', '00b4', '04400620', '3331303437333030303030333031313332323720']\n",
      "['63', '20241108175227', '0078', '04400621', '3300001204d8c37b']\n",
      "['63', '20241108175237', '0000', '04400621', '330009010023f869']\n",
      "['63', '20241108175302', '010e', '04400621', '3300001605ce4a2d']\n",
      "['63', '20241108175310', '0000', '04400621', '330009010033795a']\n",
      "['63', '20241108175315', '0168', '04400621', '330000160590d746']\n",
      "['63', '20241108185314', '00c8', '04400621', '3331303437373030323936333032393637303520']\n",
      "['63', '20241108185320', '0190', '04400621', '3331303437373030383932393139323934313820']\n",
      "['03', '20241108192638', '0190', '04420601', '00000112f8f10e81']\n",
      "['63', '20241108210833', '012c', '04420601', '3331303531373030373031373437383236333620']\n",
      "['63', '20241108214640', '0078', '04420602', '3300001204d9347e']\n",
      "['63', '20241108214705', '0078', '04420602', '3300001200103811']\n",
      "['63', '20241108214720', '00b4', '04420602', '33000002001953ca']\n",
      "['63', '20241108222637', '00b4', '04420608', '3300001204d8b3c3']\n",
      "['63', '20241108195219', '0000', '04430604', '33000203001e23c2']\n",
      "['63', '20241108215618', '010e', '04430616', '330000020029756f']\n",
      "['63', '20241108214222', '00b4', '04430617', '3300001605cc403e']\n",
      "['63', '20241108214241', '0168', '04430617', '330000010028635e']\n",
      "['63', '20241108221514', '00b4', '04430617', '3300000100039d97']\n",
      "['63', '20241108223938', '0168', '04440608', '33000016043bbb9f']\n",
      "['63', '20241108220136', '01c2', '04470601', '33000002003ee98f']\n",
      "['63', '20241108231505', '01c2', '04470604', '33000006027b8ecc']\n",
      "['63', '20241108215849', '010e', '04470615', '3300001605cf2df8']\n",
      "['63', '20241108215908', '012c', '04470615', '330000120140a376']\n",
      "['63', '20241108220553', '01c2', '04470616', '33000002000f704f']\n",
      "['63', '20241108211726', '00b4', '04480603', '33000016059003e1']\n",
      "['63', '20241108215037', '010e', '04480608', '33000002000ca347']\n",
      "['63', '20241108220020', '010e', '04480608', '3331303437333030303030333032303835383520']\n",
      "['63', '20241108224118', '0168', '04480608', '3300001605d413ed']\n",
      "['63', '20241108224206', '010e', '04480608', '33000016043ba18e']\n",
      "['63', '20241108224840', '0000', '04480608', '33000901001b1374']\n",
      "['63', '20241108192950', '00f0', '04480610', '33000012003e9e60']\n",
      "['63', '20241108214907', '00f0', '04480611', '330000120140a5a1']\n",
      "['63', '20241108214913', '00b4', '04480611', '3300001204d8b8ba']\n",
      "['63', '20241108224110', '0168', '04480612', '3331303437333030303037333030353637303320']\n",
      "['63', '20241108231945', '0168', '04480612', '330000020000d2e6']\n"
     ]
    }
   ],
   "source": [
    "wb = load_workbook(xls_name)\n",
    "sheets = wb.worksheets\n",
    "print(sheets)\n",
    "\n",
    "sheet1 = sheets[0]\n",
    "print(sheet1[1])\n",
    "# row1 = []\n",
    "# for row in sheet1[1]:\n",
    "#     print(row)\n",
    "#     row1.append(row.value)\n",
    "# print(row1)\n",
    "rows = sheet1.rows\n",
    "for row in rows:\n",
    "    row_val = [col.value for col in row]\n",
    "    print(row_val)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
